package com.zhijian.warehouse.manage.dao;

import com.zhijian.warehouse.manage.entity.po.StoreAllotRecord;
import com.zhijian.warehouse.manage.entity.vo.request.StoreAllotRecordSearchVo;
import com.zhijian.warehouse.manage.entity.vo.response.StoreAllotRecordVo;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface StoreAllotRecordMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StoreAllotRecord record);

    int insertSelective(StoreAllotRecord record);

    StoreAllotRecord selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StoreAllotRecord record);

    int updateByPrimaryKey(StoreAllotRecord record);

    /**
     * 查询总数
     *
     * @param storeAllotRecordSearchVo
     * @return
     */
    int count(StoreAllotRecordSearchVo storeAllotRecordSearchVo);

    /**
     * 查询列表
     *
     * @param storeAllotRecordSearchVo
     * @return
     */
    List<StoreAllotRecordVo> selectList(StoreAllotRecordSearchVo storeAllotRecordSearchVo);

    /**
     * 查询单个
     *
     * @param storeAllotRecordSearchVo
     * @return
     */
    StoreAllotRecordVo selectOne(StoreAllotRecordSearchVo storeAllotRecordSearchVo);

    /**
     * 根据ID查询vo
     *
     * @param id
     * @return
     */
    StoreAllotRecordVo selectVoById(Long id);

    /**
     * 批量删除
     *
     * @param idList
     * @return
     */
    void deleteByIdList(@Param("idList") List<Long> idList);

    /**
     * 动态删除
     *
     * @param storeAllotRecordSearchVo
     * @return
     */
    void deleteByCondition(StoreAllotRecordSearchVo storeAllotRecordSearchVo);

    /**
     * 批量新增
     *
     * @param entities
     * @return
     */
    int insertBatch(@Param("entities") List<StoreAllotRecord> entities);

    /**
     * 根据WarehouseOutId查询列表
     *
     * @param warehouseOutId
     * @return
     */
    List<StoreAllotRecordVo> selectListByWarehouseOutId(Long warehouseOutId);

    /**
     * 根据WarehouseInId查询列表
     *
     * @param warehouseInId
     * @return
     */
    List<StoreAllotRecordVo> selectListByWarehouseInId(Long warehouseInId);

    /**
     * 根据CreateUserId查询列表
     *
     * @param createUserId
     * @return
     */
    List<StoreAllotRecordVo> selectListByCreateUserId(Long createUserId);

    /**
     * 根据UpdateUserId查询列表
     *
     * @param updateUserId
     * @return
     */
    List<StoreAllotRecordVo> selectListByUpdateUserId(Long updateUserId);
    
    /**
     * 查询出某天最新数据的number
     *
     * @param day
     * @return
     */
    String selectMaxNumberByDay(String day);
}
